import http from '@/common/luchApi/index.js'
const objToUrl = obj => {
 	let arr = [];
 	for (let i in obj) {
 		if (obj.hasOwnProperty(i)) {
 			arr.push(encodeURIComponent(i) + "=" + encodeURIComponent(obj[i]));
 		}
 	}
 	return arr.join("&");
 }
 
export default {
	// 单独上传头像
	uploadUserPhoto(param) {
		return http.get('staff/uploadUserPhoto', param)
	},
	 // 获取个人信息
	 getUser(param) {
	 	return http.get('staff/getStaffInfo', param)
	 },
	 // 获取个人信息
	 saveUserInfo(param) {
	 	return http.post('staff/saveStaffInfo', param)
	 },
	 //申请修改银行卡
	 applyUpdateBank(param){
	 		 return http.post('staff/applyUpdateBank',param);
	 },
	 //保存附件信息
	 saveUserImage(param){
		 return http.post('staff/saveStaffImage',param);
	 },
	 //验证用户信息
	 validateUserInfo(param){
	 	return http.post('staff/validateUserInfo', param)
	 },
	 //发送合同
	 sendContract(param){
		return http.post('contract/sendContract', param)
	 },
	 //获取入职员工列表
	 getEntryList(param){
	 	return http.post('entry/getEntryStaffList', param)
	 },
	 //获取晋升记录
	 getUpgradeList(param){
	 	return http.post('upgrade/applyRecord', param)
	 },
	 getUpgradeDetail(param){
	 	return http.post('upgrade/getDetail', param)
	 },
	 //保存晋升激励
	 saveUpgradeInfo(param){
	 	return http.post('upgrade/saveUpgradeInfo',param);
	 },
	 //获取职位列表
	 getUpgradeRoleList(param){
	 	return http.post('upgrade/getRoleList', param)
	 },
	 getUpdateBankList(param){
		return http.post('entry/getUpdateBankList', param)
	 },
	 //获取职位列表
	 getRoleList(param){
	 	return http.post('entry/getRoleList', param)
	 },
	 //获取团队列表
	 getGroupList(param){
	 	return http.post('entry/getGroupList', param)
	 },
	 //获取团队列表
	 getRefereeList(param){
	 	return http.post('entry/getRefereeList', param)
	 },
	 //获取银行列表
	 getBankList(param){
	 	return http.post('entry/getBankList', param)
	 },
	 getEntryStaffDetail(param){
	 	return http.post('entry/getEntryStaffDetail', param)
	 },
	 //获取团队列表
	 addEntryStaff(param){
	 	return http.post('entry/addEntryStaff', param)
	 },
	 //上传图片
	 upload(param) {
	 	return http.post('common/uploadImg', param)
	 },
	 //根据姓名手机号获取员工是否二次入职
	 selectTwoEntryStaff(param) {
	 	return http.post('entry/selectTwoEntryStaff', param)
	 },
	 
}